/**
 * @file .
 * @author wangxiaowei0303@163.com
 */

#ifndef org_wxw0303_bishe_src_ImpulseNoise_ImpulseNoise_h_
#define org_wxw0303_bishe_src_ImpulseNoise_ImpulseNoise_h_

#include "../NoiseAlgorithm/NoiseAlgorithm.h"

class ImpulseNoise: public NoiseAlgorithm {
public:
    inline 
    ImpulseNoise();

    virtual
    ~ImpulseNoise();

    virtual void
    help(std::string &buf) const;

    virtual void
    set(const char *argname,const char *argval);

    virtual const char*
    get(const char *argname,std::string &buf) const;
    
    virtual void
    getSupportedArgs(std::vector<std::string> &arglist) const;

    virtual void
    process(cv::Mat &img);

private:
    double saltp;
    double pepperp;
};

inline
ImpulseNoise::ImpulseNoise()
{
    this->saltp = 0.1;
    this->pepperp = 0.1;
}

#endif /* org_wxw0303_bishe_src_ImpulseNoise_ImpulseNoise_h_ */

